package com.lyj.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lyj.pojo.Room;
import org.apache.ibatis.annotations.Param;
import java.util.List;

public interface RoomMapper extends BaseMapper<Room> {
    // 根据家庭ID查询房间列表
    List<Room> selectByFamilyId(@Param("familyId") Integer familyId);

    // 检查房间名称在家庭内是否已存在
    Integer countByFamilyIdAndRoomName(@Param("familyId") Integer familyId, @Param("roomName") String roomName);

    Room selectDefaultRoom(@Param("familyId") Integer familyId);
}

